package com.zj.study.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zj.study.mapper.UserMapper;
import com.zj.study.model.User;
import com.zj.study.service.UserService;
import org.springframework.stereotype.Service;
import reactor.core.publisher.Mono;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author zj
 * @since 2021-06-25
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {


    @Override
    public Mono<List<User>> getList() {
        return Mono.just(baseMapper.selectList(null));
    }

    @Override
    public List<User> getByUsername(String username) {
        return lambdaQuery().like(User::getName, username).list();
    }

}
